The present invention is related to object-oriented computer systems and, more particularly, to a translator object for testing an interface to a server object.
As individual computer systems increasingly become more powerful and complex, the integration of these heterogeneous computer systems becomes a very desirable yet difficult task. Users"" expectations for interoperability have increased dramatically due to the availability of highly interoperable platforms such as UNIX, Microsoft Windows and Apple Macintosh. Unfortunately, vendor-specific solutions for integrating heterogeneous computer systems have generally been unsatisfactory. This is especially true because vendor-specific solutions require upgrades to take into account new product releases.
The Object Management Group (OMG) has promulgated standards for nonvendor-specific solutions for heterogeneous systems integration. At the heart of OMG""s standard is the Common Object Request Broker Architecture (CORBA). CORBA is a distributed environment defined using object-oriented concepts to hide all differences between programming languages, operating systems, hardware platforms, and object location. This interoperability is achieved through well-defined interface specifications at the application level.
Well-defined protocols exist for allowing systems to communicate by agreeing to certain standards that will be used. The Open Systems Interconnection (OSI) seven layer model is possibly the most widespread of these protocols. The lowest layer, the Physical layer, describes how the physical network is accessed. The Data Link layer provides reliable transmission across a physical link. The Network layer deals with connection establishment and routing. The Transport layer provides reliable end-to-end transmission. The Session layer is concerned with connection control. The Presentation layer deals with data syntax and transparency to the applications. Lastly, the upper layer, the Application layer, describes end-user functionality. Conceptually, CORBA resides in the Application layer.
A central component of CORBA is the Object Request Broker (ORB) which is the infrastructure for providing transparent distributed communication across heterogeneous systems. The CORBA specification describes all the standard interfaces for ORBS. The Basic Object Adapter (BOA) is an initial set of ORB interfaces for object implementations.
CORBA is a peer-to-peer distributed computer facility where all applications are objects. Objects can alternate between being a client and a server, where a client object is defined as being the originator of an object invocation and a server object is defined as being the recipient of an object invocation. Server objects are also referred to as object implementations. Typically, objects play both roles at one time or another.
CORBA provides two mechanisms with or through which applications-may communicate: static interfaces and dynamic interfaces. In static interfaces, the parameters are defined at compile-time whereas in dynamic interfaces, the parameters are defined at run-time.
Static interfaces include a stub and a skeleton. The client object links to the stub so that from the client""s perspective, the stub acts like a local function call. Transparently, the stub provides an interface to the ORB that encodes and decodes the specified operation""s parameters into communication formats suitable for transmission. The skeleton is the corresponding server-side implementation of the interface. When the server object completes processing of the request, the skeleton and stub return the results to the client, along with any exceptions that are generated by either the server or the ORB.
Dynamic interfaces are an alternative to compiled static interfaces. Dynamic interfaces include a Dynamic Invocation Interface (DII) and a Dynamic Skeleton Interface (DSI). The DII is a generic facility for invoking any operation with a run-time-defined parameter list. A run-time interface description of the operation signature specifying the parameter list is retrieved during run-time. Thus, a request can be constructed to previously unknown operation or object type. The DSI is the corresponding server-side implementation of the interface. Use of the dynamic interface instead of the static interface is transparent to object implementation.
It has been estimated that the majority of applications utilize static interfaces. As a result, oftentimes, a test suite has already been developed to test the static interfaces to a server object. Developing test suites is a time consuming process so it would be desirable to provide more efficient systems and methods for testing interfaces.
Embodiments of the present invention provide innovative systems and methods for testing interfaces to a server object. The present invention may utilize an existing test suite for static interfaces to test dynamic interfaces without requiring that a new test suite be developed. A translator object is placed between a client object (e.g., executing the test suite) and the server object for which the dynamic interface is to be tested. The client and server objects communicate utilizing the static interfaces, however, the translator object communicates requests between the two utilizing the dynamic interface, thereby testing the dynamic interface.
In one embodiment, the present invention provides a method of testing a particular interface to a server object in a computer system, comprising the steps of: sending a request with a tested interface to a translator object; the translator object receiving the request with the particular interface; the translator object sending the request with the particular interface to the server object; and the server object receiving the request with the tested interface. The tested interface may be static and the particular interface to be tested may be dynamic.
In another embodiment, the present invention provides a system for testing a particular interface to a server object, comprising: a client object that sends requests with a tested interface; a translator object that receives the requests with the particular interface from the client object and sends the requests in the particular interface; a server object that receives the requests with the tested interface from the translator object; and a transfer medium that connects the client object, translator object and server object. The tested interface may be static and the particular interface to be tested may be dynamic.
Other features and advantages of the present invention will become apparent upon a perusal of the remaining portions of the specification and drawings.